<template>
	<view>
		<view class="p-l-48 p-r-48 m-t-48">
		<view class="route-content p-l-32 p-r-32 p-t-26 p-b-26">
			<view class="start flex">
				<view class="start-icon flex-content">
					<image class="fa-icon" src="../../static/images/fa.png" mode=""></image>
				</view>
				<view class=" m-l-10">
					{{item.addressVal[0].start_address}}
					
				</view>
			</view>
			<view class="dtdline">
				
			</view>
			<view class="end flex col-center">
				<view class="end-icon flex-content">
					<image class="shou-icon" src="../../static/images/shou.png" mode=""></image>
				</view>
				<view class="m-l-10">
					{{item.addressVal[0].end_address}}
					
				</view>
			</view>
			<view class="m-t-20 flex " style="justify-content: flex-end;">
				<view class="flex-content btn-content m-r-15" @click.stop="editRoute">
					编辑
				</view>
				<view class="flex-content btn-content" @click.stop="delRoute">
					删除
				</view>
			</view>
		</view>
		</view>
		<u-modal :show-cancel-button="true" @confirm="delconfirm" v-model="showmodal " content="确定删除"></u-modal>
	</view>
</template>

<script>
	export default {
		name:"route-list",
		props:{
			item:{
				type:Object,
				default:()=>{}
			}
		},
		data() {
			return {
				showmodal:false,
				
			};
		},
		methods:{
			editRoute(){
				this.$emit("editroute",this.item.id)
			},
			delconfirm(){
				this.$emit("delroute",this.item.id)
			},
			delRoute(){
				this.showmodal=true
				
			}
		}
	}
</script>

<style lang="scss" scoped>
	.btn-content{
	   width: 112rpx;
	   height: 48rpx;
	   border-radius: 10rpx;
	   border: 4rpx solid #BBBBBB;
	}
	.route-content{
		border-radius: 10rpx;
		overflow: hidden;
		background-color: #FFFFFF;
	}
	.start-icon{
		width: 40rpx;
		font-size: 24rpx;
		height: 40rpx;
		border-radius: 30rpx;
		// background-color: #191919;
		// color: #FFFFFF;
		
	}
	.end-icon{
		width: 40rpx;
		font-size: 24rpx;
		height: 40rpx;
		border-radius: 30rpx;
		// 	color: #FFFFFF;
		// background-color: #F06666;
	}
	.fa-icon {
		height: 100%;
	}
	.shou-icon{
		height: 100%;
	}
	.dtdline{
		width:1rpx;
		height:32rpx;
		margin:8rpx;
		margin-left:14rpx;
		border-right: 6rpx dotted #999;
	}
</style>
